<template>
  <div>
    <div class="all">
      <ul>
        <li v-for="item in video" :key="item.videoId">
            <Details :data='item'/>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import Details from './details.vue'
import {getVideoAll} from '@/api'
export default {
    components:{
      Details
    },
    data(){
        return{
          video:[]
        }
    },
    methods:{
        goDet(){
            this.$router.push('/detali')
        },
        getVideo(){
          getVideoAll().then(res=>{
            console.log(res,'获取视频')
            this.video = res.data.data
          })
        }
    },
    mounted(){
      this.getVideo()
    }
};
</script>

<style scoped>
li{
  padding:3vh 0;
}
</style>